<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title><?php echo $title_meta ?>广州橙盟整合营销传播有限公司</title>
		<link rel="stylesheet" type="text/css" href="css/animate.css"/>
		<link rel="stylesheet" type="text/css" href="css/all.css"/>
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		
		<script>
		var _hmt = _hmt || [];
		(function() {
		  var hm = document.createElement("script");
		  hm.src = "https://hm.baidu.com/hm.js?ffc95645a052fc80af8573e3f0832b7e";
		  var s = document.getElementsByTagName("script")[0]; 
		  s.parentNode.insertBefore(hm, s);
		})();
		</script>

	

	</head>
	<body>
		
		<div class="header">
			<a href="index.php" class="fl header_logo">
				<img src="images/header_logo.png"/>
			</a>
			<div class="fr search">
				<a href="javascript:;" class="fr header_searchimg">
					<img src="images/header_search.png"/>
				</a>
				<input type="text" value=""  class="header_searchinput fr"/>
				<div class="clear"></div>
			</div>
			<ul class="header_nav fr">
				<li>
					<a href="index.php">首页</a>
				</li>
				<li>
					<a href="about.php">关于</a>
				</li>
				<li>
					<a href="works.php">作品</a>
				</li>
				<li>
					<a href="contact.php">联系</a>
				</li>
				<li>
					<a href="recruit.php">招聘</a>
				</li>
				<div class="clear"></div>
			</ul>
			<div class="clear"></div>
		</div>
		
<script type="text/javascript">
	var inputwid = $(".search").width();
	console.log(inputwid);
	$(".header").on("mouseenter",".search", function() {
		$(".header .header_searchinput").addClass("searchhover");
	});
	$(".header").on("mouseleave",".search", function() {
		$(".header .header_searchinput").removeClass("searchhover");
 	});
// 	$(".header_searchimg").click(function(){
// 		alert(111);
// 	})
   	$(".header").on("click",".header_searchimg",function(){
   		var keyval = $(".header_searchinput").val();
   		if (!keyval) return false;
//    		console.log(keyval);
   		$.ajax({
   			type:"post",
   			url:"./app/index.php?m=index&a=search",
   			data:{"key":keyval},
   			success:function(ret){
   				if (ret.status == 0) {
                	alert('查无数据！');
                	return false;
            	}
   				var at = "search.php?key="+keyval;
   				location.href = at;
   			}
   		});
   	})
   	$('.header_searchinput').bind('keypress',function(event){
        if(event.keyCode == "13")    
        {
        var keyval = $(".header_searchinput").val();
   		if (!keyval) return false;
   		$.ajax({
   			type:"post",
   			url:"./app/index.php?m=index&a=search",
   			data:{"key":keyval},
   			success:function(ret){
   				if (ret.status == 0) {
                	alert('查无数据！');
                	return false;
            	}
   				var at = "search.php?key="+keyval;
   				location.href = at;
   			}
   		});
        }
    });
</script>